//
//  YXVideoData+Internal.h
//  YXImageBrowserDemo
//
//  Created by guo peng huang on 2021/5/19.
//

#import "YXVideoData.h"

NS_ASSUME_NONNULL_BEGIN

@protocol YXVideoDataDelegate <NSObject>
@required

- (void)yx_startLoadingAVAssetFromPHAssetForData:(YXVideoData *)data;

- (void)yx_finishLoadingAVAssetFromPHAssetForData:(YXVideoData *)data;

- (void)yx_startLoadingFirstFrameForData:(YXVideoData *)data;

- (void)yx_finishLoadingFirstFrameForData:(YXVideoData *)data;

- (void)yx_videoData:(YXVideoData *)data downloadingWithProgress:(CGFloat)progress;

- (void)yx_finishDownloadingForData:(YXVideoData *)data;

- (void)yx_videoData:(YXVideoData *)data readyForThumbImage:(UIImage *)image;

- (void)yx_videoData:(YXVideoData *)data readyForAVAsset:(AVAsset *)asset;

- (void)yx_videoIsInvalidForData:(YXVideoData *)data;

@end

@interface YXVideoData ()

@property (nonatomic, assign, getter=isLoadingAVAssetFromPHAsset) BOOL loadingAVAssetFromPHAsset;

@property (nonatomic, assign, getter=isLoadingFirstFrame) BOOL loadingFirstFrame;

@property (nonatomic, assign, getter=isDownloading) BOOL downloading;

@property (nonatomic, weak) id<YXVideoDataDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
